local game = require "club.threecard.sudoku"

local M = game.ui.element()

function M:ctor()
    self.progress = 0
end

function M:set_progress(value, tween)
    self.progress = value
    if not tween then
        self.slider.value = value
        return
    end
    if self.slider.value < value then
        self.glow_img:DOFade(1, 1):SetEase(self.glow_curve)
    end
    self.slider:DOValue(value, 0.5)
end

function M:on_injected(bind)
    self.glow_curve = self.glow_curve_asset.curve
end

return M